window.onload = function () {
    var mydiv = document.getElementById("mydiv");
    console.log(typeof mydiv);
    if (mydiv instanceof HTMLElement) {
        mydiv.style.backgroundColor = "blue";
        mydiv.style.color = "white";
    }
};
